using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;

namespace THSERP.Modules.Report
{
    public partial class ARRP010SaleOrdersGridControl : THSGridControl
    {
        protected override DevExpress.XtraGrid.Views.Grid.GridView InitializeGridView()
        {
            DevExpress.XtraGrid.Views.Grid.GridView gridView = base.InitializeGridView();
            gridView.OptionsView.ShowFooter = true;
            gridView.OptionsBehavior.Editable = false;

            DevExpress.XtraGrid.Columns.GridColumn colTotalAmount = gridView.Columns["ARSaleOrderTotalAmount"];
            colTotalAmount.SummaryItem.FieldName = "ARSaleOrderTotalAmount";
            colTotalAmount.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            colTotalAmount.SummaryItem.DisplayFormat = "{0:n2}";

            DevExpress.XtraGrid.Columns.GridColumn colDepositBalance = gridView.Columns["ARSaleOrderDepositBalance"];
            colDepositBalance.SummaryItem.FieldName = "ARSaleOrderDepositBalance";
            colDepositBalance.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            colDepositBalance.SummaryItem.DisplayFormat = "{0:n2}";

            DevExpress.XtraGrid.Columns.GridColumn colBalanceDue = gridView.Columns["ARSaleOrderBalanceDue"];
            colBalanceDue.SummaryItem.FieldName = "ARSaleOrderBalanceDue";
            colBalanceDue.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            colBalanceDue.SummaryItem.DisplayFormat = "{0:n2}";

            return gridView;
        }
    }
}
